using System;
using Microsoft.Extensions.Configuration;

namespace Read.Services
{
    /// <summary>
    /// 获取全局的Configuration
    /// </summary>
    public class GlobalService
    {
        //public static IServiceProvider ServiceProvider { get; set; }
        public static IConfiguration Configuration { get; set; }
    }

    /// <summary>
    /// 配置项获取
    /// </summary>
    public class ConfigService
    {
        /// <summary>
        /// 获取网站名称
        /// </summary>
        public static string WebName
        {
            get
            {
                return GlobalService.Configuration.GetConnectionString("WebName");
            }
        }

        /// <summary>
        /// 验证码Session的Key
        /// </summary>
        public static string SessionKey
        {
            get
            {
                return "ValidateCodeOozol";
            }
        }
    }
}